class Task002 : TaskBase
{
  override public SolveInt() : int
  {
    def fiboSum(acc, x0, x1)
    {
      | _ when x1 > 1000000 => acc
      | _ => fiboSum(acc + x1, 2 * x1 + x0, 3 * x1 + 2 * x0)
    };
    fiboSum(0, 1, 2)
  }
}
